package com.kuang.method;

import java.util.Scanner;

public class Demo05 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int sum = scanner.nextInt();
        System.out.println(f(sum));
    }
    public static int  f(int n) {
        if (n == 1) {
            return 1;
        }else{
            return n*f(n-1);
        }
    }
}
